{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Determining total optical depth from optical depth at 1 micron"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Derivation of the Angstrom Exponent"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The authors of RRTM_SW use the following equation to determine the aerosol optical depth (AOD) at a given wavelength based on the optical depth at a reference wavelength (1 micron in RRTM_SW):\n",
    "\n",
    "$$ AOD(\\lambda) = \\frac{ AOD(\\lambda_{ref}) * (a_1 + a_2 * [\\frac{\\lambda}{\\lambda_{ref}}]) } {[(a_1 + a_2 -1) + [\\frac{\\lambda}{\\lambda_{ref}}]^{a_0} } $$\n",
    "\n",
    "Note that this formula contains three \"fit parameters\", $a_0$, $a_1$, and $a_2$, which allows one to describe a 2nd-order (parabolic) dependence of the AOD on wavelength.\n",
    "\n",
    "But to describe a linear relationship of AOD with wavelength, one sets $a_2 = 0$ and $a_1 = 1$.  This reduces the RRTM_SW equation to the more familiar expression involving the \"Angstrom exponent\".\n",
    "\n",
    "$$ AOD(\\lambda) = \\frac{ AOD(\\lambda_{ref}) } {[\\frac{\\lambda}{\\lambda_{ref}}]^{a_0} } $$\n",
    "\n",
    "Rearranging and using $\\tau$ for AOD gives\n",
    "\n",
    "$$ \\tau(\\lambda) = \\tau(\\lambda_{ref}) * [\\frac{\\lambda}{\\lambda_{ref}}]^{-a_0} $$\n",
    "\n",
    "where $a_0$ is the \"Angstrom exponent\".\n",
    "\n",
    "So, in summary, if $a_2 = 0$ and $a_1 = 1$, the $a_0$ is the \"Angstrom exponent\"."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Calculating the total aerosol optical depth"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The total aerosol optical depth is found by integrating $tau$ over wavelength.  The integration can be performed over the solar spectrum because this is the spectral region that is important for aerosol scattering effects.\n",
    "\n",
    "$$ \\tau = \\int_{\\lambda_1}^{\\lambda_2} \\tau(\\lambda) d\\lambda = \\int_{\\lambda_1}^{\\lambda_2} \\tau(\\lambda_{ref}) * [\\frac{\\lambda}{\\lambda_{ref}}]^{-a_0} d\\lambda $$\n",
    "\n",
    "Many of the variables in the integration are independent of wavelength and can be removed from the integration.\n",
    "\n",
    "$$ \\tau = \\frac{ \\tau(\\lambda_{ref}) } {\\lambda_{ref}^{-a_0} } \\int_{\\lambda_1}^{\\lambda_2}  \\lambda^{-a_0} d\\lambda $$\n",
    "\n",
    "The integration over wavelength is simple and results in\n",
    "\n",
    "$$ \\tau = \\frac{ \\tau(\\lambda_{ref}) } {\\lambda_{ref}^{-a_0} } \\frac{ (\\lambda_2^{-a_0 + 1} - \\lambda_1^{-a_0 + 1}) } {-a_0 + 1} $$\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Relationship of total aerosol optical depth to that at the reference wavelength."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The total aerosol optical depth, $\\tau$, happens be related to the AOD at the reference wavelength by a constant.  This is true for ANY reference wavelength, although the constant is different for different reference wavelengths.  Here is how they are related:\n",
    "\n",
    "$$ \\tau = \\tau(\\lambda_{ref}) * \\frac{ (\\lambda_2^{-a_0 + 1} - \\lambda_1^{-a_0 + 1}) } {(-a_0 + 1) * \\lambda_{ref}^{-a_0}} =  \\tau(\\lambda_{ref}) * C $$\n",
    "\n",
    "where $C$ is a constant.\n",
    "\n",
    "Below is a calculation of C using reasonable values."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5.50458268712\n"
     ]
    }
   ],
   "source": [
    "lmda0 = 1.          # Reference wavelength\n",
    "lmda1 = 0.2         # Minimum wavelength of solar radiation\n",
    "lmda2 = 3.8         # Maximum wavelength of solar radiation\n",
    "a0    = 2.184       # Angstrom exponent\n",
    "\n",
    "C     = (lmda2**(-a0+1) - lmda1**(-a0+1)) / ((-a0+1) * lmda0**(-a0) )\n",
    "print(C)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In conclusion, this means that the TOTAL aerosol optical depth can easily be determined from the aerosol optical depth at the reference wavelength by simply using\n",
    "\n",
    "$$ \\tau =  \\tau(\\lambda_{ref}) * C $$"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
